// 商品的相关接口
import req from '@/utils/request'

// 19.添加商品 /goods/add
export const api_goods_add=data=>{
    return req({
        url:'/goods/add',
        method:'post',
        data
    })
}
// 20.获取商品列表/goods/list

export const api_goods_list=params=>{
    return req({
        url:'/goods/list',
        method:'get',
        params
    })
}
// 修改商品/goods/edit
export const api_goods_edit=data=>{
    return req({
        url:'/goods/edit',
        method:'post',
        data
    })
}
// 21.删除商品/goods/del
export const api_goods_del=params=>{
    return req({
        url:'/goods/del',
        method:'get',
        params
    })
}

//13.添加分类 /goods/addcate
export const api_goods_addcate=data=>{
    return req({
        url:'/goods/addcate',
        method:'post',
        data
    })
}
// 14.获取分类列表 /goods/catelist
export const api_goods_catelist=params=>{
    return req({
        url:'/goods/catelist',
        method:'get',
        params
    })
}
// 16.修改分类/goods/editcate

export const api_goods_editcate=data=>{
    return req({
        url:'/goods/editcate',
        method:'post',
        data
    })
}

// 15.删除分类 /goods/delcate
export const api_goods_delcate=params=>{
    return req({
        url:'/goods/delcate',
        method:'get',
        params
    })
}
// 17.查询所有启用的分类名称/goods/categories

export const api_goods_categories=()=>{
    return req({
        url:'/goods/categories',
        method:'get'
    })
}